Skip to content
This repository has been archived by the owner on Jan 17, 2019. It is now read-only.

Mongo Error when starting griffin-env docker container #34

Open
rootsongjc opened this issue Dec 21, 2016 · 5 comments
Open

Mongo Error when starting griffin-env docker container #34

rootsongjc opened this issue Dec 21, 2016 · 5 comments

Comments

@rootsongjc
Copy link

rootsongjc commented Dec 21, 2016

Error mesages when starting docker container
2016-12-21T05:45:48.180 ERROR [org.springframework.scheduling.support.TaskUtils$LoggingErrorHandler] - Unexpected error occurred in scheduled task.
com.mongodb.MongoException$Network: Read operation to server localhost/127.0.0.1:27017 failed on database unitdb0
at com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:253)
at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:216)
at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:288)
at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:273)
at com.mongodb.DBCursor._check(DBCursor.java:368)
at com.mongodb.DBCursor._hasNext(DBCursor.java:459)
at com.mongodb.DBCursor.hasNext(DBCursor.java:484)
at com.ebay.oss.griffin.repo.BaseRepo.getAll(BaseRepo.java:66)
at com.ebay.oss.griffin.service.DqScheduleServiceImpl.createJobToRunBySchedule(DqScheduleServiceImpl.java:122)
at com.ebay.oss.griffin.service.DqScheduleServiceImpl.schedulingJobs(DqScheduleServiceImpl.java:110)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:64)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at com.mongodb.DBPort._open(DBPort.java:223)
at com.mongodb.DBPort.go(DBPort.java:125)
at com.mongodb.DBPort.call(DBPort.java:92)
at com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:244)
... 22 more

I can't delete /var/lib/mongo/mongo.lock
bash-4.1# mongod -f /etc/mongod.conf about to fork child process, waiting until server is ready for connections. forked process: 3608 ERROR: child process failed, exited with error number 100

Environment
docker1.11
centos7.2

@bhlx3lyx7
Copy link
Contributor

Thanks for your question.
We want to know when did this error occur, the time you just run our docker image built following our steps or in some other condition?
We retried docker again, it works well here, and it could read from mongoDB installed in this docker image. I think in docker there should not be any environment issue, and our testing docker version is just 1.12.
Therefore, can you tell us your test steps and the error occurring condition? Thanks.

@rootsongjc
Copy link
Author

@bhlx3lyx7 Thank you for your reply.
I followed the build step yesterday to make the docker image.
I build the docker image on mac with docker 1.12 but import the tar package on docker 1.11.
Maybe this is the key point - version gap.

@bhlx3lyx7
Copy link
Contributor

@rootsongjc Well, it might be about the different version. I also tried save the image and load it in another docker 1.12 env, it works well. So can you run it in a docker 1.12 env?

@rootsongjc
Copy link
Author

I run it on docker 1.12, that error didn't happen again but found another error:
NestedThrowablesStackTrace:
java.sql.SQLException: Unable to open a test connection to the given database. JDBC url = jdbc:mysql://localhost:3306/metastore?createDatabaseIfNotExist=true, username = hive. Terminating connection pool (set lazyInit to true if you expect to start your database after your app). Original Exception: ------
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

@bhlx3lyx7
Copy link
Contributor

We've provided a built docker image on docker hub, and you can just pull it and run, follow the new steps here. From the same image there should not be any environment issue I think.
Thank you for pushing us forward.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants